package com.example.web.controller;

import com.wf.captcha.utils.CaptchaUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: springsecurity-study
 * @description: 图形验证码controller类
 * @author: ChenZhiXiang
 * @create: 2019-07-28 21:41
 **/
@RestController
public class CaptchaController {

    @GetMapping("/images/captcha")
    public void captcha(HttpServletRequest request, HttpServletResponse response) throws Exception {
        CaptchaUtil.outPng(3,request,response);
    }

}
